<!DOCTYPE HTML>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>生产数据明细</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link href="css/haiersoft.css" rel="stylesheet" type="text/css" media="screen,print" />
    <link href="css/print.css" rel="stylesheet" type="text/css" media="print" />
    <script src="js/jquery-1.10.1.min.js"></script>
    <script src="js/side.js" type="text/javascript"></script>
    <!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
</head>

<body>
    <!-- wrap_left -->
    <div class="wrap_left" id="frmTitle" name="fmTitle">
        <!-- Logo -->
        <div id="Logo"><span>人单合一</span></div>
        <!-- /Logo -->
        <!-- menu_list -->
        <script>
        $(function() {
            $(".menu_list dd");
            $(".menu_list dt").click(function() {
                $(this).toggleClass("open").next().slideToggle("fast");
            });
        });
        </script>
        <div class="menu_list">
            <dl>
                <dt><span>生产过程追溯及其防差错系统</span></dt>
                <dd><a href="index_task.html" title="任务下达">任务下达</a>
                    <a href="index_data.html" title="生产数据明细">生产数据明细</a>
                </dd>
                <dt><span>产品质量统计分析系统</span></dt>
                <dd><a href="index_quality.html" title="生产质量报表">生产质量报表</a>
                    <a href="index_quality.html" title="员工报表">员工报表</a>
                    <a href="index_produce.html" title="生产线能力分析">生产线能力分析</a>
                </dd>
                <dt><a href="index_andon.html"><span>可视化电子看板系统</span></a></dt>
                <dd></dd>
                <dt><a href="index_andon.html"><span>智能安灯系统</span></a></dt>
                <dt><a href="index_andon.html"><span>系统参数配置</span></a></dt>
            </dl>
        </div>
        <!-- /menu_list -->
    </div>
    <!-- /wrap_left -->
    <!-- picBox -->
    <div class="picBox" onclick="switchSysBar()" id="switchPoint"></div>
    <!-- /picBox -->
    <!-- wrap_right -->
    <div class="wrap_right">
        <header>
            <!-- Header -->
            <div id="Header">
                <!-- Head -->
                <div id="Head">
                    <h1 title="中久MES系统">中久MES系统</h1>
                    <script language="javascript">
                    // function showmenu(id) { id.style.visibility = "visible"; }

                    // function hidmenu() { UserList.style.visibility = "hidden"; }
                    // document.onclick = hidmenu;
                    </script>
                    <div class="user">
                        <img src="">
                        <a>安灯状态标识</a>
                    </div>
                </div>
                <!-- /Head -->
                <nav>
                    <ul id="Navi">
                        <li><a href="index.html"><img src="images/common/navi01.png" width="30" height="36" alt="主页管理"><span>主页</span></a></li>
                        <li><a href="index_task.html"><img src="images/common/navi03.png" width="26" height="36" alt="合同信息"><span>任务下达</span></a></li>
                        <li class="active"><a href="index_data.html"><img src="images/common/navi06.png" width="36" height="36" alt="生产数据明细"><span>生产数据明细</span></a></li>
                        <li><a href="index_quality.html"><img src="images/common/navi07.png" width="34" height="36" alt="生产质量报表"><span>生产质量报表</span></a></li>
                        <li><a href="index_elect.html"><img src="images/common/navi04.png" width="34" height="36" alt="电子看板"><span>电子看板</span></a></li>
                        <li><a href="index_produce.html"><img src="images/common/navi05.png" width="24" height="36" alt="生产线能力分析"><span>生产线能力分析</span></a></li>
                        <li><a href="index_andon.html"><img src="images/common/navi08.png" width="34" height="36" alt="安灯事件"><span>安灯事件</span></a></li>
                        <li><a href="index_setting.html"><img src="images/common/navi02.png" width="36" height="36" alt="系统设置"><span>系统设置</span></a></li>
                    </ul>
                </nav>
            </div>
            <!-- /Header -->
        </header>
        <!-- Contents -->
        <div id="Contents">
            <script type="text/javascript">
            $(function() {
                $(".select").each(function() {
                    var s = $(this);
                    var z = parseInt(s.css("z-index"));
                    var dt = $(this).children("dt");
                    var dd = $(this).children("dd");
                    var _show = function() {
                        dd.slideDown(200);
                        dt.addClass("cur");
                        s.css("z-index", z + 1);
                    };
                    var _hide = function() {
                        dd.slideUp(200);
                        dt.removeClass("cur");
                        s.css("z-index", z);
                    };
                    dt.click(function() { dd.is(":hidden") ? _show() : _hide(); });
                    dd.find("a").click(function() {
                        dt.html($(this).html());
                        _hide();
                    });
                    $("body").click(function(i) {!$(i.target).parents(".select").first().is(s) ? _hide() : ""; });
                })
            })
            </script>
            <!-- TopMain -->
            <div id="TopMain">
                <!-- selectbox -->
                <div class="selectbox floatL mag_r20">
                    <span class="sttl">产品条码：</span>
                    <input type="text" id="productCode" name="产品条码" style="width:200px;height:23px;"></input>
                </div>
                <!-- btn_box -->
                <div class="btn_box floatL mag_r20"><input id="getProInfo" name="" type="button" value="查询" onmousemove="this.className='input_move'" onmouseout="this.className='input_out'"></div>
                <!-- /btn_box -->
                <!-- selectbox -->
                <div class="selectbox floatL mag_r20">
                    <span class="sttl">产品批次号：</span>
                    <input type="text" id="batch" name="产品条码" style="width:200px;height:23px" readonly="readonly"></input>
                </div>
                <!-- /selectbox -->
                <!-- btn_box -->
           <!--      <div class="btn_box floatL mag_r20"><input id="getBadPro" name="" type="button" value="查询" onmousemove="this.className='input_move'" onmouseout="this.className='input_out'"></div> -->
                <!-- /btn_box -->
            </div>
            <!-- /TopMain -->
            <!-- MainForm -->
            <div id="MainForm" class="floatL" style="overflow-x: auto; overflow-y: auto; height: 600px; width:900px;">
                <div class="form_boxA">
                    <h2 id="getParName" style="font-size: 1.5em;font-style: 微软雅黑">产品生产明细</h2>
                    <table id="table1" cellpadding="0" cellspacing="0">
                        <tr>
                            <th>工序</th>
                            <th>参数名称</th>
                            <th>参数值</th>
                            <th>合格标志</th>
                            <th>生产时间</th>
                            <th>生产线号</th>
                            <th>设备编号</th>
                            <th>工位号</th>
                            <th>员工条码</th>
                        </tr>
                        <!--                <tr>
                            <td>工序1</td>
                            <td>参数1</td>
                            <td>参数1值</td>
                            <td class="f_cA">合格</td>
                            <td>2019/1/12 08:00:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>参数2</td>
                            <td>参数2值</td>
                            <td class="f_cB">不合格</td>
                            <td>2019/1/12 08:00:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>参数3</td>
                            <td>参数3值</td>
                            <td class="f_cA">合格</td>
                            <td>2019/1/12 08:00:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr>
                        <tr>
                            <td>工序2</td>
                            <td>参数1</td>
                            <td>参数1值</td>
                            <td class="f_cA">合格</td>
                            <td>2019/1/12 08:15:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>参数2</td>
                            <td>参数2值</td>
                            <td class="f_cA">合格</td>
                            <td>2019/1/12 08:15:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>参数3</td>
                            <td>参数3值</td>
                            <td class="f_cA">合格</td>
                            <td>2019/1/12 08:15:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>参数4</td>
                            <td>参数4值</td>
                            <td class="f_cA">合格</td>
                            <td>2019/1/12 08:15:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr>
                        <tr>
                            <td>工序3</td>
                            <td>参数1</td>
                            <td>参数1值</td>
                            <td class="f_cA">合格</td>
                            <td>2019/1/12 08:20:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>参数2</td>
                            <td>参数2值</td>
                            <td class="f_cA">合格</td>
                            <td>2019/1/12 08:20:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>参数3</td>
                            <td>参数3值</td>
                            <td class="f_cA">合格</td>
                            <td>2019/1/12 08:20:32</td>
                            <td>1</td>
                            <td>1</td>
                            <td>1</td>
                            <td>000000000001</td>
                        </tr> -->
                    </table>
                </div>
                <div class="btn_box alignC" style="margin-top: 120px;padding-bottom: 0;">
                    <input name="" type="button" value="导出为EXCEL" onmousemove="this.className='input_move'" onmouseout="this.className='input_out'">
                </div>
            </div>
            <!-- /RightForm -->
            <div class="form_boxE floatL" style="margin-left: 10px">
                <div class="form_boxA" style="overflow-x: auto; overflow-y: auto; height: 300px; width:280px;">
                    <h2>部件批次号</h2>
                    <table id="table2" cellpadding="0" cellspacing="0">
                        <tr>
                            <th>部件名称</th>
                            <th>批次号</th>
                        </tr>
                        <!--    <tr>
                            <td>部件1</td>
                            <td>0000000000001</td>
                        </tr>
                        <tr>
                            <td>部件2</td>
                            <td>0000000000001</td>
                        </tr>
                        <tr>
                            <td>部件3</td>
                            <td>0000000000001</td>
                        </tr>
                        <tr>
                            <td>部件4</td>
                            <td>0000000000001</td>
                        </tr>
                        <tr>
                            <td>部件5</td>
                            <td>0000000000001</td>
                        </tr>
                        <tr>
                            <td>部件6</td>
                            <td>0000000000001</td>
                        </tr>
                        <tr>
                            <td>部件7</td>
                            <td>0000000000001</td>
                        </tr>
                        <tr>
                            <td>部件8</td>
                            <td>0000000000001</td>
                        </tr> -->
                    </table>
                </div>
                <div style="margin-top: 40px;background-color: whitesmoke;text-align: center">
                    <button class="openBad">查询不合格</button>
                    <table class="aliginC">
                        <tr>
                            <td width="100"><span class="floatR ">不合格数:</span></td>
                            <td>
                                <div class="txtbox floatL" style="width:100px;"><span class="badCount"></span></div>
                            </td>
                        </tr>
                    </table>
                </div>
                <div style="margin-top: 15px;position: relative;">
                    <span style="margin-top: 15px;text-align: center"> 不合格产品条码列表 </span>
                    <div class="txtbox badBatch">
                        <!-- <textarea name="" cols="25" rows="8"></textarea> -->
                    </div>
                </div>
            </div>
        </div>
        <!-- /RightForm -->
        <!-- /MainForm -->
        <!-- PageNum -->
        <!--<ul id="PageNum">
<li><a href="">首页</a></li>
<li><a href="">上一页</a></li>
<li><a href="">1</a></li>
<li><a href="">2</a></li>
<li><a href="">3</a></li>
<li><a href="">4</a></li>
<li><a href="">5</a></li>
<li><a href="">6</a></li>
<li><a href="">下一页</a></li>
<li><a href="">尾页</a></li>
</ul>-->
        <!-- /PageNum -->
    </div>
    <!-- /Contents -->
    <!-- /footer -->
    <footer>
        <!--<address>电子邮箱：sales@haiersoft.com  技术支持：<br>杭州中久自控有限公司  Copyright &copy; 2015 Haiersoft Corporation, All Rights.</address>-->
    </footer>
    <!-- /footer -->
    </div>
    <!-- /wrap_right -->
    <script src="layui/layui.all.js"></script>
    <script src="js/andonStatus.js"></script>
    <script src="js/index_data.js"></script>
    <script>
    /**
     根据产品批次号查询不合格数及不合格产品条码
    **/
    function getBadPro(processName, productlineNum, startTime, endTime, deviceNum, batch, stationNum, employeeCode) {
        $.ajax({
                // url: '../json/getBadPro.json',
                url: 'http://localhost:8080/getBadPro',
                type: 'get',
                // dataType: 'default: Intelligent Guess (Other values: xml, json, script, or html)',
                data: {
                    // method: 'getBadPro',
                    processName:processName,
                    productlineNum:productlineNum,
                    startTime:startTime,
                    endTime:endTime,
                    deviceNum:deviceNum,
                    batch:batch,
                    stationNum:stationNum,
                    employeeCode:employeeCode
                },
            })
            .done(function(data) {
                console.log("getComName");
                var data = data.data;
                $(".badCount").html(data.badCount);
                var html = "";
                for (var i = 0; i < data.badProductCode.length; i++) {
                    html += `<p>${data.badProductCode[i]}</p>`;
                }

                $(html).appendTo('.badBatch');
            })
            .fail(function() {
                console.log("error");
            })
    }
    </script>
</body>

</html>